package com.geek.javase.ch02.test5;
/*
 *@author wangpeng
 *2025/10/10 22:05
 *@description TODO
 * 装备类
 * 属性：
 *  装备拥有名称name，级别level，颜色color，类别kind，攻击力power，防御力defence。
 * 方法：
 *  装备拥有获取装备信息的方法show()。
 */
public class Equipment {

    private String name;
    private int level;
    private String color;
    private double power;
    private double defence;
    private String kind;

    //获取装备信息的方法
    public void show(){
        System.out.println("装备名称："+name);
        System.out.println("装备级别："+level);
        System.out.println("装备颜色："+color);
        System.out.println("装备攻击力："+power);
        System.out.println("装备防御力："+defence);
        System.out.println("装备类别："+kind);
    }

    public Equipment() {
    }

    public Equipment(String name, int level, String color, double power, double defence, String kind) {
        this.name = name;
        this.level = level;
        this.color = color;
        this.power = power;
        this.defence = defence;
        this.kind = kind;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return level
     */
    public int getLevel() {
        return level;
    }

    /**
     * 设置
     * @param level
     */
    public void setLevel(int level) {
        this.level = level;
    }

    /**
     * 获取
     * @return color
     */
    public String getColor() {
        return color;
    }

    /**
     * 设置
     * @param color
     */
    public void setColor(String color) {
        this.color = color;
    }

    /**
     * 获取
     * @return power
     */
    public double getPower() {
        return power;
    }

    /**
     * 设置
     * @param power
     */
    public void setPower(double power) {
        this.power = power;
    }

    /**
     * 获取
     * @return defence
     */
    public double getDefence() {
        return defence;
    }

    /**
     * 设置
     * @param defence
     */
    public void setDefence(double defence) {
        this.defence = defence;
    }

    /**
     * 获取
     * @return kind
     */
    public String getKind() {
        return kind;
    }

    /**
     * 设置
     * @param kind
     */
    public void setKind(String kind) {
        this.kind = kind;
    }

    public String toString() {
        return "Equipment{name = " + name + ", level = " + level + ", color = " + color + ", power = " + power + ", defence = " + defence + ", kind = " + kind + "}";
    }
}
